<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Trilium Web Clipper Test</title>
</head>
<body>
    <h3>Trilium Web Clipper Test</h3>
    
    <button id="test-button">Test Service Worker</button>
    <button id="save-page-button">Save Whole Page</button>
    
    <div id="result"></div>
    
    <script>
        document.getElementById('test-button').addEventListener('click', function() {
            chrome.runtime.sendMessage({name: 'test'}, function(response) {
                document.getElementById('result').innerHTML = 'Test result: ' + JSON.stringify(response);
            });
        });
        
        document.getElementById('save-page-button').addEventListener('click', function() {
            chrome.runtime.sendMessage({name: 'save-whole-page'}, function(response) {
                document.getElementById('result').innerHTML = 'Save result: ' + JSON.stringify(response);
            });
        });
    </script>
</body>
</html> 